package com.ruoyi.ledger.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 账本流水记录
 * @author: zyh
 * @date: 2025/3/3 12:15
 **/
public class LedgerRecord extends BaseEntity {


    private static final long serialVersionUID = 1L;

    /** 账本记录id主键 */
    private String ledgerRecordId;

    /** 账本id */
    @Excel(name = "账本id")
    private String ledgerId;

    /** 记账类型（0:支出 1:收入） */
    @Excel(name = "记账类型", readConverterExp = "0=:支出,1=:收入")
    private String recordType;

    /** 总预算 */
    @Excel(name = "总预算")
    private BigDecimal amount;

    /** 账本记录项目类型 */
    @Excel(name = "账本记录项目类型")
    private String ledgerConfigId;

    /** 账本记录项目名称 */
    @Excel(name = "账本记录项目名称")
    private String ledgerInfoId;

    /** 用户id */
    @Excel(name = "用户id")
    private String userId;

    /** 记录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date recordTime;

    /** 是否删除0 ：否 1:是 */
    @Excel(name = "是否删除0 ：否 1:是")
    private Integer isDelete;

    public void setLedgerRecordId(String ledgerRecordId)
    {
        this.ledgerRecordId = ledgerRecordId;
    }

    public String getLedgerRecordId()
    {
        return ledgerRecordId;
    }
    public void setLedgerId(String ledgerId)
    {
        this.ledgerId = ledgerId;
    }

    public String getLedgerId()
    {
        return ledgerId;
    }
    public void setRecordType(String recordType)
    {
        this.recordType = recordType;
    }

    public String getRecordType()
    {
        return recordType;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setLedgerConfigId(String ledgerConfigId)
    {
        this.ledgerConfigId = ledgerConfigId;
    }

    public String getLedgerConfigId()
    {
        return ledgerConfigId;
    }
    public void setLedgerInfoId(String ledgerInfoId)
    {
        this.ledgerInfoId = ledgerInfoId;
    }

    public String getLedgerInfoId()
    {
        return ledgerInfoId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setRecordTime(Date recordTime)
    {
        this.recordTime = recordTime;
    }

    public Date getRecordTime()
    {
        return recordTime;
    }
    public void setIsDelete(Integer isDelete)
    {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete()
    {
        return isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("ledgerRecordId", getLedgerRecordId())
                .append("ledgerId", getLedgerId())
                .append("recordType", getRecordType())
                .append("amount", getAmount())
                .append("ledgerConfigId", getLedgerConfigId())
                .append("ledgerInfoId", getLedgerInfoId())
                .append("userId", getUserId())
                .append("recordTime", getRecordTime())
                .append("remark", getRemark())
                .append("isDelete", getIsDelete())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .toString();
    }
}
